<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>库存查询</title>
 	<link href="../resources/css/ligerui-all.css" rel="stylesheet" type="text/css" /> 
	<script src="../resources/js/jquery-1.9.1.min.js" type="text/javascript"></script>
	<script src="../resources/js/ligerui.min.js" type="text/javascript"></script>
	
    <script type="text/javascript">
    	$(function ()
        {
            var jsonObj = {};
            jsonObj.Rows = [
                { id: 3, name: "排骨", category: "肉类食品", unit: "斤", currentInventory: "1100", currentCost: "21", totalInventory: "1232" },
				{ id: 3, name: "鸡肉", category: "肉类食品", unit: "斤", currentInventory: "1320", currentCost: "13", totalInventory: "234" },
				{ id: 3, name: "猫粮", category: "杂食", unit: "包", currentInventory: "110", currentCost: "7", totalInventory: "770" },
				{ id: 3, name: "猪", category: "肉类食品", unit: "条", currentInventory: "1", currentCost: "800", totalInventory: "800" },
				{ id: 3, name: "菠菜", category: "青菜", unit: "斤", currentInventory: "20", currentCost: "9", totalInventory: "180" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" },
				{ id: 3, name: "啤酒", category: "酒水类", unit: "打", currentInventory: "40", currentCost: "110", totalInventory: "440" }
            ];
            alert(jsonObj);
            $("#isr").ligerGrid({
                columns: [
                { display: '项目编号', name: 'id', width: 100, type: 'int', editor: { type: 'int'} },
                { display: '项目名称', name: 'name', width: 100 },
				{ display: '项目类型', name: 'category', width: 100 },
                { display: '单位', name: 'unit', width: 100},
                { display: '当前库存', name: 'currentInventory', type: 'double', width: 100 },
				{ display: '单位成本', name: 'currentCost', type: 'double', width: 100 },
				{ display: '库存总额', name: 'totalInventory', type: 'double', width: 100 }
                ], //width: 1000,
                data: jsonObj, 
             //   pageSizeOptions: [5, 10, 15, 20]
            });
			
			/**表单弄漂亮点**/
			$("form").ligerForm();
             
        });
    </script>
    <style type="text/css">
		#isr { margin-left:5px;}
    	#tdMsg{ width:90px;}
		#trMsg { height:28px;}
		.l-table-edit-td{ padding:4px; text-align:right;}
		.l-button-submit,.l-button-reset{width:80px; float: right; margin-left:10px; padding-bottom:2px;}
		
    </style>
</head>

<body>
	<!--可根据 编号、名称、类型、库存量进行查询-->
	<div id="isearch">
    	
    	<form action="" method="post">
    	<table border="0" cellpadding="0" cellspacing="1" width="900">
         	<tr id="trMsg">
            	<td colspan="4" align="left">
                	<div style="margin-left:5px; font-size:14px;  font-weight:bold;">>>库存查询</div>
                </td>
            </tr>
        	<tr id="trMsg">
            	<td id="tdMsg" class="l-table-edit-td">编号：</td>
                <td class="l-table-edit-td">
                	<input type="text" name="id" id="txtName" ltype="text"/>
                </td>
            	<td id="tdMsg" class="l-table-edit-td">姓名：</td>
                <td class="l-table-edit-td">
                	<input type="text" name="name" id="txtName" ltype="text" /></td>
            </tr>
            <tr id="trMsg">
            	<td id="tdMsg" class="l-table-edit-td">类型：</td>
                <td class="l-table-edit-td"> 
                    <select name="category" id="ddlDepart" ltype="select">
                        <option value="-1" selected="selected">====请选择====</option>
                        <option value="vegetables">蔬菜类</option>
                        <option value="drinks">酒水类</option>
                        <option value="meat">肉类</option>
                    </select>
                </td>
                <td id="tdMsg" class="l-table-edit-td">库存量：</td>
                <td class="l-table-edit-td">
                	<input type="text" name="currentInventory" id="txtName" ltype="text"/></td>
            </tr>
            <tr id="trMsg">
            	<td colspan="4" align="right">
                	<input type="reset" value="清 空" name="reset"  class="l-button l-button-reset"/>
                	<input type="submit" value="查 询" name="submit" class="l-button l-button-submit" />
                </td>
            </tr>
        </table>
    	</form>
    </div>
	<div id="isr"></div>
</body>
</html>